#!/bin/bash

SERVERNAME="admin"

function rebuild() {
  echo "rebuild $SERVERNAME"
  sh ry.sh rebuild 8200 $SERVERNAME
  echo "end"

}


function restart() {
   echo "restart 8200 $SERVERNAME"
   sh ry.sh restart 8200 $SERVERNAME
}


function cleanbuild() {
    echo "cleanbuild $SERVERNAME"
    sh ry.sh cleanbuild 8200 $SERVERNAME
    echo "end"
}

function pull() {
    echo "gitPull $SERVERNAME"
    sh ry.sh gitpull 0 $SERVERNAME
    echo "end"
}

cd /home/valve/RuoYi-Mes

case $1 in
  clean)
    cleanbuild;;
  pull)
    pull;;
  restart)
    restart;;
  *)
    rebuild;;
esac

